//
//  UIView+ZZUtil.h
//  OCFrame
//
//  Created by hfzhangzhang on 2016/12/19.
//  Copyright © 2016年 hfzhangzhang. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (ZZUtil)

@end

@interface UIView (geometry)

@property (nonatomic, assign) CGFloat x;
@property (nonatomic, assign) CGFloat y;
@property (nonatomic, assign) CGFloat centerX;
@property (nonatomic, assign) CGFloat centerY;
@property (nonatomic, assign) CGFloat width;
@property (nonatomic, assign) CGFloat height;
@property (nonatomic, assign) CGSize size;
@property (nonatomic, assign) CGPoint origin;
@property (nonatomic, assign) CGFloat minX;
@property (nonatomic, assign) CGFloat minY;
@property (nonatomic, assign) CGFloat maxX;
@property (nonatomic, assign) CGFloat maxY;

-(void)zz_setMaskRadius:(float)radius;

//指定大小圆角，且带border
- (void)zz_cornerRadius:(CGFloat)radius borderColor:(UIColor*)borderColor borderWidth:(CGFloat)borderWidth;

/**
 对UIView的四个角进行选择性的圆角处理

 @param byRoundingCorners  UIRectCorner枚举
 @param cornerRadii 角度半径
 */
- (void)makeRoundedCorner:(UIRectCorner)byRoundingCorners cornerRadii:(CGSize)cornerRadii;


@end

@interface UIView (gesture)
/**
 添加点击事件
 
 @param tapAction 点击调用
 */
- (void)zz_addTapBlock:(void(^)(id obj))tapAction;

@end

@interface UIView (screenshot)
/**
 针对view屏幕截图,若是全屏控制器view,则是截屏功能
 */
- (UIImage *)screenshot;

@end

/**
 设置默认空白界面，例如断网，无数据等
 */
@interface UIView (empty)

@property (nonatomic, strong) UIView *emptyView;

- (void)setEmpty:(BOOL)empty animated:(BOOL)animated;

@end


/**
 扩大点击区域
 */
@interface UIView (TouchAreaExpand)

/**
 [enlargeButton setEnlargeEdge:20.0];
 或者[enlargeButton setEnlargeEdgeWithTop:20 right:20 bottom:20 left:10];

 */
- (void)zz_setEnlargeEdge:(CGFloat) size;
- (void)zz_setEnlargeEdgeWithTop:(CGFloat) top right:(CGFloat) right bottom:(CGFloat) bottom left:(CGFloat) left;


@end


